load("//:build_variables.bzl", "COPTS")
load("//tools/lint:linters.bzl", "clang_tidy_test")

package(
    default_visibility = ["//:android_cuttlefish"],
)

cc_library(
    name = "metrics",
    srcs = [
        "metrics_receiver.cc",
    ],
    hdrs = [
        "metrics_receiver.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
    deps = [
        ":metrics_headers",
        "//cuttlefish/common/libs/fs",
        "//cuttlefish/common/libs/utils:tee_logging",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/msg_queue",
        "//libbase",
        "@fruit",
        "@gflags",
        "@jsoncpp",
    ],
)

clang_tidy_test(
    name = "metrics_clang_tidy",
    srcs = [":metrics"],
    tags = ["clang_tidy", "clang-tidy"],
)

cc_library(
    name = "metrics_headers",
    hdrs = [
        "metrics_configs.h",
        "metrics_defs.h",
    ],
    copts = COPTS,
    strip_include_prefix = "//cuttlefish",
)

clang_tidy_test(
    name = "metrics_headers_clang_tidy",
    srcs = [":metrics_headers"],
    tags = ["clang_tidy", "clang-tidy"],
)
